# Makefile
CC = gcc
# 包含头文件路径
CFLAGS = -Wall -g -IDemo1 -IDemo -ICommunication_module -IData_processing_module -ISensor
LDFLAGS = -pthread

TARGET = Main
SRCS = Main.c Demo1/Demo1.c Demo/Demo.c Communication_module/cm.c Data_processing_module/dp.c Sensor/Sensor.c
OBJS = $(SRCS:.c=.o)

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $^

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f $(OBJS) $(TARGET)

.PHONY: all clean
